package com.woniu.zsd.recycle.controller;


import cn.hutool.core.bean.BeanUtil;
import com.woniu.zsd.common.util.Result;
import com.woniu.zsd.recycle.form.StoreForm;
import com.woniu.zsd.recycle.param.StoreParam;
import com.woniu.zsd.recycle.service.RecyclingRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 彭于晏
 * @since 2025年02月18日
 */
@RestController
@RequestMapping("/recyclingRecord")
@Api(tags = "入库确认")
public class RecyclingRecordController {
    @Resource
    private RecyclingRecordService recyclingRecordService;
    @PostMapping("/store")
    @ApiOperation(value = "入库确认")
    public Result store(@RequestBody StoreForm form)throws Exception{
        recyclingRecordService.store(BeanUtil.toBean(form, StoreParam.class));
        return Result.success("入库确认成功",null);
    }
}

